//
//  CETransformCell.m
//  digitalCurrency
//
//  Created by 来迎宾 on 2019/4/4.
//  Copyright © 2019年 XinHuoKeJi. All rights reserved.
//

#import "CETransformCell.h"

@interface CETransformCell ()
@end

@implementation CETransformCell

+ (instancetype)createTableView:(UITableView *)tableView {
    CETransformCell *cell = [tableView dequeueReusableCellWithIdentifier:@"litcell"];
    cell.selectionStyle   = UITableViewCellSelectionStyleNone;
    cell.backgroundColor  = [UIColor whiteColor];

    [cell makeViews];
    
    return cell;
}

- (void)makeViews {
    
    [self.contentView addSubview:self.textField];
    [self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(22);
        make.top.mas_equalTo(20);
        make.right.mas_equalTo(-65);
        make.height.mas_equalTo(41);
    }];
    
    [self.contentView addSubview:self.scanbtn];
    [self.scanbtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(25);
        make.right.mas_equalTo(-22);
        make.width.height.mas_equalTo(30);
    }];
}

- (UIButton *)scanbtn {
    if (!_scanbtn) {
        _scanbtn = [UIButton buttonWithType:UIButtonTypeSystem];
        _scanbtn.titleLabel.font = [UIFont systemFontOfSize:14];
        [_scanbtn setImage:ImageRenderingName(@"saoma") forState:UIControlStateNormal];
        _scanbtn.tintColor = [UIColor colorWithHEX:maincolor];
    }
    
    return _scanbtn;
}

- (UITextField *)textField {
    if (!_textField) {
        _textField = [[UITextField alloc] init];
        _textField.font = [UIFont systemFontOfSize:14];
        _textField.borderStyle = UITextBorderStyleRoundedRect;
        _textField.clearButtonMode = UITextFieldViewModeWhileEditing;
        _textField.placeholder = LocalizationKey(@"Please enter address");
        _textField.textColor   = tThreeColor;
        _textField.backgroundColor = [UIColor clearColor];
        _textField.layer.cornerRadius = 5;
        _textField.layer.borderColor  = tTableViewCellLine.CGColor;
        _textField.layer.borderWidth  = 1;
//        [_textField setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
    }
    
    return _textField;
}


@end
